﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InventoryList.aspx.cs"
    Inherits="SalesManagement.Modules.Warehouse.Inventory" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Danh sách kỳ kiểm kho</title>

    <script type="text/javascript">
        function DocumentReady() {
            var obj = document.getElementById('ResourceManager1');
            MethodNamespace.DocumentReady({
                success: function() {

                }
            });
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="MethodNamespace">
        <Listeners>
            <DocumentReady Handler="DocumentReady();" Delay="100" />
        </Listeners>
    </ext:ResourceManager>
    <ext:Store ID="storeWarehouse" runat="server">
        <Reader>
            <ext:JsonReader IDProperty="WarehouseId">
                <Fields>
                    <ext:RecordField Name="WarehouseId" />
                    <ext:RecordField Name="WarehouseName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Viewport ID="ViewPort1" runat="server" Layout="RowLayout">
        <Items>
            <ext:Toolbar ID="tbMain" runat="server">
                <Items>
                    <ext:ToolbarSpacer />
                    <ext:Button ID="btnAdd" runat="server" Text="Thêm mới" Icon="Add">
                        <DirectEvents>
                            <Click OnEvent="btnAdd_Click" />
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="btnEdit" runat="server" Text="Hiệu chỉnh" Icon="FolderEdit">
                        <DirectEvents>
                            <Click OnEvent="btnEdit_Click" />
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button ID="btnDelete" runat="server" Text="Xóa" Icon="Delete">
                        <DirectEvents>
                            <Click OnEvent="btnDelete_Click" />
                        </DirectEvents>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
            <ext:Panel ID="Panel0" runat="server" Frame="true" Layout="FormLayout" Border="false">
                <Defaults>
                    <ext:Parameter Name="Anchor" Value="99%">
                    </ext:Parameter>
                </Defaults>
                <Items>
                    <ext:ComboBox ID="cbWarehouse" FieldLabel="Kho hàng" runat="server" Editable="false"
                        DataIndex="Title" StoreID="storeWarehouse" DisplayField="WarehouseName" ValueField="WarehouseId" />
                    <ext:DateField ID="dateInventory" FieldLabel="Thời gian" runat="server" Format="dd/M/yyyy" />
                    <ext:TextArea ID="txtNote" FieldLabel="Ghi chú" runat="server" />
                </Items>
            </ext:Panel>
            <ext:GridPanel ID="GridPanel2" runat="server" AutoExpandColumn="pro_name" Border="false"
                RowHeight="1">
                <Store>
                    <ext:Store ID="Store2" runat="server">
                        <Reader>
                            <ext:JsonReader IDProperty="pro_id">
                                <Fields>
                                    <ext:RecordField Name="pro_id" />
                                    <ext:RecordField Name="pro_name" />
                                    <ext:RecordField Name="pro_unit" />
                                    <ext:RecordField Name="pro_book" />
                                    <ext:RecordField Name="pro_fact" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel2" runat="server">
                    <Columns>
                        <ext:Column ColumnID="pro_id" DataIndex="pro_id" Header="Mã hàng " />
                        <ext:Column DataIndex="pro_name" Header="Tên hàng" />
                        <ext:Column DataIndex="pro_unit" Header="Đơn vị tính" />
                        <ext:Column DataIndex="pro_book" Header="Hàng tồn sổ sách" />
                        <ext:Column DataIndex="pro_fact" Header="Hàng tồn thực tế" />
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolbar ID="PagingToolBar2" runat="server" PageSize="10" />
                </BottomBar>
                <LoadMask ShowMask="true" />
            </ext:GridPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
